package com.example.goodpet.community.bean;

import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;

import java.util.List;

public class UserTieziInfo implements Parcelable {

    private long userId;
    private String phoneNumber;
    private String nickname;
    private String portrait;
    private long gender;
    private String signature;
    private long tieziId;
    private String content;
    private String postdate;
    private long likeNum;
    private long collectNum;
    private long messageNum;
    private List<String> tieziImage;
    private boolean isLike;
    private boolean isCollect;
    private boolean isFoucs;

    public UserTieziInfo() {
    }

    public List<String> getTieziImage() {
        return tieziImage;
    }

    public void setTieziImage(List<String> tieziImage) {
        this.tieziImage = tieziImage;
    }

    protected UserTieziInfo(Parcel in) {
        userId = in.readLong();
        phoneNumber = in.readString();
        nickname = in.readString();
        portrait = in.readString();
        gender = in.readLong();
        signature = in.readString();
        tieziId = in.readLong();
        content = in.readString();
        postdate = in.readString();
        likeNum = in.readLong();
        collectNum = in.readLong();
        messageNum = in.readLong();
        tieziImage = in.createStringArrayList();
        isLike = in.readByte()!=0;
        isCollect = in.readByte()!=0;
        isFoucs = in.readByte()!=0;
    }


    @Override
    public String toString() {
        return "UserTieziInfo{" +
                "userId=" + userId +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", nickname='" + nickname + '\'' +
                ", portrait='" + portrait + '\'' +
                ", gender=" + gender +
                ", signature='" + signature + '\'' +
                ", tieziId=" + tieziId +
                ", content='" + content + '\'' +
                ", postdate='" + postdate + '\'' +
                ", likeNum=" + likeNum +
                ", collectNum=" + collectNum +
                ", messageNum=" + messageNum +
                ", tieziImage=" + tieziImage +
                ", isLike=" + isLike +
                ", isCollect=" + isCollect +
                ", isFoucs=" + isFoucs +
                '}';
    }

    public boolean isFoucs() {
        return isFoucs;
    }

    public void setFoucs(boolean foucs) {
        isFoucs = foucs;
    }

    public boolean isCollect() {
        return isCollect;
    }

    public void setCollect(boolean collect) {
        isCollect = collect;
    }

    public static final Creator<UserTieziInfo> CREATOR = new Creator<UserTieziInfo>() {
        @Override
        public UserTieziInfo createFromParcel(Parcel in) {
            return new UserTieziInfo(in);
        }

        @Override
        public UserTieziInfo[] newArray(int size) {
            return new UserTieziInfo[size];
        }
    };

    public long getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(long likeNum) {
        this.likeNum = likeNum;
    }

    public long getCollectNum() {
        return collectNum;
    }

    public void setCollectNum(long collectNum) {
        this.collectNum = collectNum;
    }

    public long getMessageNum() {
        return messageNum;
    }

    public void setMessageNum(long messageNum) {
        this.messageNum = messageNum;
    }

    public boolean isLike() {
        return isLike;
    }

    public void setLike(boolean like) {
        isLike = like;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }


    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }


    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }


    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }


    public long getGender() {
        return gender;
    }

    public void setGender(long gender) {
        this.gender = gender;
    }


    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }


    public long getTieziId() {
        return tieziId;
    }

    public void setTieziId(long tieziId) {
        this.tieziId = tieziId;
    }


    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


    public String getPostdate() {
        return postdate;
    }

    public void setPostdate(String postdate) {
        this.postdate = postdate;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(userId);
        dest.writeString(phoneNumber);
        dest.writeString(nickname);
        dest.writeString(portrait);
        dest.writeLong(gender);
        dest.writeString(signature);
        dest.writeLong(tieziId);
        dest.writeString(content);
        dest.writeString(postdate);
        dest.writeLong(likeNum);
        dest.writeLong(collectNum);
        dest.writeLong(messageNum);
        dest.writeStringList(tieziImage);
        dest.writeByte((byte) (isLike==true?1:0));
        dest.writeByte((byte) (isCollect==true?1:0));
        dest.writeByte((byte) (isFoucs==true?1:0));
    }
}
